<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=4, initial-scale=1.0">
    <title>详细信息</title>
    <link rel="stylesheet" href="../css/user.css">
    <link rel="stylesheet" href="../css/publis.css">
    <style>
        .show {
            width: 90%;
            height: 15rem;
            background-color: #fff;
            position: fixed;
            top: 50%;
            left: 50%;
            margin-top: -9rem;
            margin-left: -45%;
            padding: 1rem;
            box-sizing: border-box;
            display: flex;
            flex-wrap: wrap;
            display: none;
        }
        
        .show-top {
            border-bottom: 1px solid #ccc;
            font-size: 20px;
            font-weight: 700;
            padding: 1rem;
            width: 100%;
        }
        
        .show_center {
            padding: 1rem;
            width: 100%;
        }
        
        .show-bottom {
            padding: 1rem;
            width: 100%;
            box-sizing: border-box;
        }
        
        .show-bottom button {
            margin-left: 1rem;
            width: 30%;
            height: 2rem;
            float: right;
            background-color: #3B97FD;
            border: none;
            border: 1px solid #ccc;
            color: #fff;
        }
    </style>
</head>

<body>
    <table>
        <tbody>
            <tr>
                <td>
                    <div class="user-left">
                        <img src="<%= mineDatas.headimgurl %>" alt="">
                        <div class="user-right">
                            <p>
                                <%= mineDatas.nickname %>
                            </p>
                            <span>
                                
                            </span>
                        </div>
                    </div>
                </td>
                <td>
                    <a href="#" class="getGo">解除微信绑定</a>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="show">
        <div class="show-top">
            <p>退出登录</p>
        </div>
        <div class="show_center">
            <p>确定要要退出登录吗</p>
        </div>
        <div class="show-bottom">
            <button class="confirm">确定</button>
            <button class="cancel">取消</button>
        </div>
    </div>
    <script src="/js/config.js"></script>
    <script src="/js/jquery-3.6.0.min.js"></script>
    <script>
        $('.getGo').click(function() {
            $('.show').css('display', 'block')
            $('.confirm').click(function() {
                var settings = {
                    "url": `${Url}/Wechat/Api/UnlinkWechat`,
                    "method": "POST",
                    "timeout": 0,
                    "headers": {
                        "Authorization": Authorization,
                        "Content-Type": "application/json",
                        "Accept": "*/*",
                    },
                    "data": JSON.stringify({
                        "wechatId": "<%= mineDatas.openid %>"
                    }),
                };

                $.ajax(settings).done(function(response) {
                    if (response.code == 200) {
                        window.location.href = 'long'
                    }
                });
            })
            $('.cancel').click(function() {
                $('.show').css('display', 'none')
            })

        })
    </script>
    <script>
    </script>
</body>

</html>